<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>登录</title>
  <link rel="stylesheet"
    href="/framework-ui/src/main/resources/static/agcloud/framework/js-lib/agcloud-lib/css/reset.css"
    th:href="@{/agcloud/framework/js-lib/agcloud-lib/css/reset.css}">
  <link rel="stylesheet"
    href="/framework-ui/src/main/resources/static/agcloud/framework/js-lib/element-2.15.1/element.css"
    th:href="@{/agcloud/framework/js-lib/element-2.15.1/element.css}">
  <link rel="stylesheet"
    href="/framework-ui/src/main/resources/static/agcloud/framework/ui-private/default/common/css/layout.css"
    th:href="@{/agcloud/framework/ui-private/default/common/css/layout.css}">
  <link rel="stylesheet" href="../../../../../../../static/agcloud/framework/login/user/pc/three/css/index.css"
    th:href="@{/agcloud/framework/login/user/pc/three/css/index.css}">
  <script>
    var ctx = '[[@{/}]]';
    var LOGIN_CONFIG = '[(${loginConfig})]';
    var FORGETPASSWORDFLAG = '[(${forgetPassword})]'; //是否开启忘记密码配置
  </script>
</head>

<body>
  <div id="app" v-loading.fullscreen="loading" v-cloak>
    <div class="login-box">
      <div class="title">
        <template v-if="loginConfig.useTitleImage == 0">{{loginConfig.titleContent || '奥格政务云'}}</template>
        <img class="img" :src="loginConfig.titleImageUrl" alt="title" v-else>
      </div>
      <div class="light-b"></div>
      <div class="login-wrap" :class="[loginConfig.needCaptcha == 1? 'has-code':'']">
        <!-- <div class="tip">欢迎登录</div> -->

        <div class="content">
          <p class="ellipsisLn msg-b" v-show="showLgMsg"><i class="el-icon-warning"></i>{{lgMsg}}</p>
          <el-form class="lg-form" ref="lgForm" :model="lgForm" :rules="lgRules">
            <el-form-item prop="username">
              <el-input size="small" v-model="lgForm.username" placeholder="请输入用户名">
                <i slot="prefix" class="inp-icon icon-user"></i>
              </el-input>
            </el-form-item>
            <el-form-item prop="password">
              <el-input size="small" v-model="lgForm.password" type="password" placeholder="请输入密码">
                <i slot="prefix" class="inp-icon icon-pwd"></i>
              </el-input>
            </el-form-item>
            <el-form-item prop="imageCode" v-if="loginConfig.needCaptcha == 1">
              <el-input size="small" v-model="lgForm.imageCode" placeholder="请输入验证码">
                <i slot="prefix" class="inp-icon icon-code"></i>
                <img id="verifyCodeImg" class="code-image" slot="append" :src="verCodeObj.src" alt="校验码" @click="getCode">
              </el-input>
            </el-form-item>
             <a :href="ctx + '/user/resetPwd.html'" class="forget-pwd" target="_blank" v-if="forgetPasswordFlag=='true'">忘记密码</a>
          </el-form>
          <el-button class="lg-btn" v-loading="lgLoading" @click="loginFn" :disabled="loginBtnObj.isDisabled">
            {{loginBtnObj.tip}}</el-button>
        </div>
      </div>
    </div>
    <!-- 页脚 -->
    <p class="page-footer" v-if="loginConfig.showPageFooter == 1">{{loginConfig.pageFooterContent}}</p>

    <!--修改密码弹窗 start-->
    <el-dialog :title="dialogTitie" class="edit-password" :visible.sync="editPasswordFlag" top="30vh" width="480px">
      <el-form :model="editPasswordData" :rules="editPasswordRule" ref="editPasswordData">
        <el-form-item label="请输入原密码：" label-width="160px" prop="oldPassword">
          <el-input size="small" v-model="editPasswordData.oldPassword" type="password"></el-input>
        </el-form-item>
        <el-form-item label="请输入新密码：" label-width="160px" prop="newPassword">
          <el-input size="small" v-model="editPasswordData.newPassword" type="password"
            @keyUp.native="pwStrength(editPasswordData.newPassword)"></el-input>
        </el-form-item>
        <el-form-item label="请再次输入新密码：" label-width="160px" prop="newPasswordCheck">
          <el-input size="small" v-model="editPasswordData.newPasswordCheck" type="password"></el-input>
        </el-form-item>
        <el-form-item label="新密码强度：" label-width="160px">
          <div class="pwd-strength-box">
            <div id="strength_L" class="str-l level-box">弱</div>
            <div id="strength_M" class="str-m level-box">中</div>
            <div id="strength_H" class="str-h level-box">强</div>
          </div>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="editPasswordFlag = false;">取消</el-button>
        <el-button size="small" type="primary" @click="editPasswordSubmit">保存</el-button>
      </div>
    </el-dialog>
    <!--修改密码弹窗 end-->
    <!-- 选择组织-start -->
    <el-dialog title="请选择顶级组织" :visible.sync="slObj.slOrgDg" width="500px" top="30vh" :show-close="false"
      :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="slObj.slForm" :rules="slObj.slRules" ref="slForm">
        <el-form-item label="顶级组织：" label-width="100px" prop="orgId">
          <el-select size="small"  v-model="slObj.slForm.orgId" placeholder="请选择顶级组织" style="width: 100%;">
            <el-option v-for="item in slObj.slOrgOptions" :key="item.orgId" :label="item.orgName" :value="item.orgId">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" @click="slLoginFn">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 选择组织-end -->
  </div>

  <script src="/framework-ui/src/main/resources/static/agcloud/framework/js-lib/jquery-v1/jquery.min.js"
    th:src="@{/agcloud/framework/js-lib/jquery-v1/jquery.min.js}"></script>
  <script src="/framework-ui/src/main/resources/static/agcloud/framework/js-lib/vue-v2/vue.js"
    th:src="@{/agcloud/framework/js-lib/vue-v2/vue.js}"></script>
  <script src="/framework-ui/src/main/resources/static/agcloud/framework/js-lib/agcloud-lib/js/common.js"
    th:src="@{/agcloud/framework/js-lib/agcloud-lib/js/common.js}"></script>
  <script src="/framework-ui/src/main/resources/static/agcloud/framework/js-lib/element-2.15.1/element.js"
    th:src="@{/agcloud/framework/js-lib/element-2.15.1/element.js}"></script>
  <script src="../../../../../../../static/agcloud/framework/login/js/base64.js"
    th:src="@{/agcloud/framework/login/js/base64.js}"></script>
  <script src="../../../../../../../static/agcloud/framework/login/js/md5.js"
    th:src="@{/agcloud/framework/login/js/md5.js}">
  </script>
  <script src="../../../../../../../static/agcloud/framework/login/js/sm3/sm3.js"
    th:src="@{/agcloud/framework/login/js/sm3/sm3.js}"></script>
  <script src="../../../../../../../static/agcloud/framework/login/js/sm4.js"
    th:src="@{/agcloud/framework/login/js/sm4.js}">
  </script>
  <script src="../../../../../../../static/agcloud/framework/login/js/index.js"
    th:src="@{/agcloud/framework/login/js/index.js}">
  </script>
</body>

</html>